#include "vector.h"


int main(void)
{
	struct Vector *vec = create_Vector(sizeof(int));
	int i;
	for(i=0;i<10;i++)
	{
		vec->push_back(vec,&i);
		printf("current size = %d max size = %d\n",vec->get_size(vec),vec->get_max_size(vec));
	}
	for(i=20;i<30;i++)
	{
		vec->set(vec,i,&i);
		printf("current size = %d max size = %d\n",vec->get_size(vec),vec->get_max_size(vec));
	}
	vec->swap(vec,0,1);
	vec->erase(vec,5);

	for(i=0;i<30;i++)
	{
		int *ret = vec->get(vec,i);
		printf("%d ",*ret);
	}
	printf("\n");

	int *front = vec->front(vec);
	int *back = vec->back(vec);
	printf("front = %d, back = %d\n",*front,*back);

	free_Vector(vec);
	return 0;
}
